// 使用示例
loadScript('https://sdkapi.duoyou.com/js/dy_jh_sdk.js', function(err) {
    if (err) {
        console.error('加载出错');
    } else {
        console.log('加载成功');
        // 在这里使用加载的库
        // 登录
        var QueryParams = getQueryParams();
        duoyou_login(QueryParams);
        console.log("是否打开游戏：",open_game);
    }
});

function duoyou_login(user_info){
    console.log("多游登录参数：",user_info);
    user_info.cid = cid;
    user_info.gid = gid;
    faXingLogin(user_info);
}

function getQueryParams() {
    var urlParams = new URLSearchParams(window.location.search);
    var params = {};
    for (var param of urlParams.entries()) {
        params[param[0]] = param[1];
    }
    return params;
}



function duoyou_creterole(data){
    $.post(feihuo_creteroleUlr,data,function(info) {
        console.log("角色结果:",info);
    });
}



function duoyou_pay(data){
    console.log("duoyou支付数据：",data);
    dy_jh_sdk.h5paySdk(data,function (result){
        console.log("duoyou发起支付");
    });
}
